![]() |
MPWaitOnSemaphore |
||||
Header: | Multiprocessing.h | Carbon status: | Supported | |
Waits on a semaphore
OSStatus MPWaitOnSemaphore ( MPSemaphoreID semaphore, Duration timeout );
The ID of the semaphore you want to wait on.
The maximum time the function should wait before timing out. See
A result code.
If the value of the semaphore is greater than zero, the value is decremented and the function returns with noErr. Otherwise, the task is blocked awaiting a signal until the specified timeout is exceeded.
If you call this function from a cooperative task, you should specify only kDurationImmediate for the timeout length; other waits will cause the task to block.
Also see the function MPSignalSemaphore.
Introduced with Multiprocessing Services 1.0.
Supported in Carbon. Available in CarbonLib 1.0 and later when MPLibrary 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by MPLibrary 1.0 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/6/2000)